import serve from "../utils/request.js"
/* 登录 */
export const area = (params) => {
	let data = serve({
		url: "addons/shopro/address/area",
		method: "post",
		// data: params
	})
	return data
}
export const edit = (params) => {
	let data = serve({
		url: "addons/shopro/address/edit",
		method: "post",
		data: params
	})
	return data
}
export const user = (params) => {
	let data = serve({
		url: "addons/shopro/user",
		method: "post",
		data: params
	})
	return data
}
export const init = (params) => {
	let data = serve({
		url: "addons/shopro/index/init",
		method: "get",
		// data: params
	})
	return data
}
export const recharge = (params) => {
	let data = serve({
		url: "addons/shopro/trade_order/recharge",
		method: "post",
		data: params
	})
	return data
}
export const detail = (params) => {
	console.log(params);
	let data = serve({
		url: "addons/shopro/trade_order/detail",
		method: "get",
		data: params
	})
	return data
}
export const prepay = (params) => {

	let data = serve({
		url: "addons/shopro/pay/prepay",
		method: "post",
		data: params
	})
	return data
}
export const orderIndex = (params) => {

	let data = serve({
		url: "addons/shopro/order/index",
		method: "get",
		data: params
	})
	return data
}

export const coupons = (params) => {

	let data = serve({
		url: "addons/shopro/coupons",
		method: "get",
		data: params
	})
	return data
}
export const address = (params) => {

	let data = serve({
		url: "addons/shopro/address",
		method: "get",
		data: params
	})
	return data
}
export const info = (params) => {

	let data = serve({
		url: "addons/shopro/address/info",
		method: "get",
		data: params
	})
	return data
}

export const itemDetail = (params) => {

	let data = serve({
		url: "addons/shopro/order/itemDetail",
		method: "get",
		data: params
	})
	return data
}
export const aftersale = (params) => {

	let data = serve({
		url: "addons/shopro/order_aftersale/aftersale",
		method: "post",
		data: params
	})
	return data
}

export const order_aftersale = (params) => {

	let data = serve({
		url: "addons/shopro/order_aftersale/detail",
		method: "post",
		data: params
	})
	return data
}